/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package upeu.cepre.model;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Elvis Zangetsu
 */
@Entity
@Table(name = "pagos")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pagos.findAll", query = "SELECT p FROM Pagos p"),
    @NamedQuery(name = "Pagos.findByIdPagos", query = "SELECT p FROM Pagos p WHERE p.idPagos = :idPagos"),
    @NamedQuery(name = "Pagos.findByNombrePagos", query = "SELECT p FROM Pagos p WHERE p.nombrePagos = :nombrePagos"),
    @NamedQuery(name = "Pagos.findByMonto", query = "SELECT p FROM Pagos p WHERE p.monto = :monto")})
public class Pagos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "idPagos")
    private String idPagos;
    @Column(name = "nombrePagos")
    private String nombrePagos;
    @Column(name = "monto")
    private String monto;
    @OneToMany(mappedBy = "idPagos")
    private Collection<Detalleperiodopagos> detalleperiodopagosCollection;

    public Pagos() {
    }

    public Pagos(String idPagos) {
        this.idPagos = idPagos;
    }

    public String getIdPagos() {
        return idPagos;
    }

    public void setIdPagos(String idPagos) {
        this.idPagos = idPagos;
    }

    public String getNombrePagos() {
        return nombrePagos;
    }

    public void setNombrePagos(String nombrePagos) {
        this.nombrePagos = nombrePagos;
    }

    public String getMonto() {
        return monto;
    }

    public void setMonto(String monto) {
        this.monto = monto;
    }

    @XmlTransient
    public Collection<Detalleperiodopagos> getDetalleperiodopagosCollection() {
        return detalleperiodopagosCollection;
    }

    public void setDetalleperiodopagosCollection(Collection<Detalleperiodopagos> detalleperiodopagosCollection) {
        this.detalleperiodopagosCollection = detalleperiodopagosCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idPagos != null ? idPagos.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pagos)) {
            return false;
        }
        Pagos other = (Pagos) object;
        if ((this.idPagos == null && other.idPagos != null) || (this.idPagos != null && !this.idPagos.equals(other.idPagos))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "upeu.cepre.model.Pagos[ idPagos=" + idPagos + " ]";
    }
    
}
